package com.demdevdudes.disch.handler;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.input.GestureDetector.GestureAdapter;

public class GestureHandler extends GestureAdapter {
	
	private GameStateHandler gameStateHandler;
	
	public GestureHandler(GameStateHandler gameStateHandler) {
		this.gameStateHandler = gameStateHandler;
	}
	
	@Override
	public boolean tap (float x, float y, int count, int button) {
		gameStateHandler.getCurrentGameState().onTap(x, y, count, button);
		return super.tap(x, y, count, button);
	}
	
	@Override
	public boolean fling(float velocityX, float velocityY, int button) {
		Gdx.app.debug("GestureHandler", "fling detected");
		return super.fling(velocityX, velocityY, button);
	}
	
	@Override
	public boolean zoom(float initialDistance, float distance) {
		Gdx.app.debug("GestureHandler", "zoom detected");
		return super.zoom(initialDistance, distance);
	}
	
}
